home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / yacc.lbr / yacc.hlp < prev    next >
Text File  |  2011-02-03  |  2KB  |  64 lines

  1.  
  2.  
  3. YACC(1)             UNIX Programmer's Manual              YACC(1)
  4.  
  5. NAME
  6.      yacc - yet another compiler-compiler
  7.  
  8. SYNOPSIS
  9.      yacc [ -vd ] grammar
  10.  
  11. DESCRIPTION
  12.      Yacc converts a context-free grammar into a set of tables
  13.      for a simple automaton which executes an LR(1) parsing algo-
  14.      rithm.  The grammar may be ambiguous; specified precedence
  15.      rules are used to break ambiguities.
  16.  
  17.      The output file, y.tab.c, must be compiled by the C compiler
  18.      to produce a program yyparse.  This program must be loaded
  19.      with the lexical analyzer program, yylex, as well as main
  20.      and yyerror, an error handling routine.  These routines must
  21.      be supplied by the user; Lex(1) is useful for creating lexi-
  22.      cal analyzers usable by yacc.
  23.  
  24.      If the -v flag is given, the file y.output is prepared,
  25.      which contains a description of the parsing tables and a
  26.      report on conflicts generated by ambiguities in the grammar.
  27. 
  28.      If the -d flag is used, the file y.tab.h is generated with
  29.      the define statements that associate the yacc-assigned
  30.      `token codes' with the user-declared `token names'.  This
  31.      allows source files other than y.tab.c to access the token
  32.      codes.
  33.  
  34. FILES
  35.      y.output
  36.      y.tab.c
  37.      y.tab.h             defines for token names
  38.      yacc.tmp, yacc.acts temporary files
  39.      /usr/lib/yaccpar    parser prototype for C programs
  40.      /lib/liby.a         library with default `main' and `yyer-
  41.      ror'
  42.  
  43. SEE ALSO
  44.      lex(1)
  45.      LR Parsing by A. V. Aho and S. C. Johnson, Computing Sur-
  46.      veys, June, 1974.
  47.      YACC - Yet Another Compiler Compiler by S. C. Johnson.
  48.  
  49. DIAGNOSTICS
  50.      The number of reduce-reduce and shift-reduce conflicts is
  51.      reported on the standard output; a more detailed report is
  52.      found in the y.output file.  Similarly, if some rules are
  53.      not reachable from the start symbol, this is also reported.
  54.  
  55. BUGS
  56.      Because file names are fixed, at most one yacc process can
  57.  
  58. Printed 12/7/82                                                 1
  59.  
  60. YACC(1)             UNIX Programmer's Manual              YACC(1)
  61.  
  62.      be active in a given directory at a time.
  63.  
  64.